package enum_package;

public class EnumConstructure
{
    private enum Flavor {
        CHOCOLATE(100),
        VANILLA(120),
        STRAWBERRY(80);

        // enum constructor
        
        private Flavor(int aCalories)
        {
            fCalories = aCalories;
        }
        
        public String toString(){
            return "Flavour: " + name() + " and Calorie: " + fCalories;
          }
        void setCalories(int aCalories)
        {
            fCalories = aCalories;
        }

        int getCalories()
        {
            return fCalories;
        }


        private int fCalories;
    }

    public static void main(String[] args)
    {
        Flavor f = Flavor.CHOCOLATE;
        System.out.println(f);
        
        f.setCalories(55);
        System.out.println(f);
        System.out.println(f.getCalories());
        
    }

}
